package cn.kimming.system.config;

import cn.kimming.system.task.WebSystemTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @author 刘铭轩
 * date 2021-06-23
 */
@Component
public class SystemListener implements CommandLineRunner {
    @Autowired
    private WebSystemTask webSystemTask;
    @Override
    public void run(String... args) throws Exception {
        generateRoomTypeDefaultPrice();
    }

    private void generateRoomTypeDefaultPrice() {
        new Runnable() {
            @Override
            public void run() {
                webSystemTask.generateRoomTypeDefaultPrice();
            }
        }.run();
    }
}
